/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */
package com.zy.je.book.module.initimport.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zy.je.book.module.datasource.entity.GenDatasourceConf;
import com.zy.je.book.module.datasource.service.GenDatasourceConfService;
import com.zy.je.book.module.initimport.service.InitImportService;
import com.zy.je.common.core.web.rest.RestResult;
import com.zy.je.common.mybatis.ext.web.BizBaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 数据源管理
 *
 * @author lengleng
 * @date 2019-03-31 16:00:20
 */
@Api(tags = "数据导入")
@RestController
@RequiredArgsConstructor
@RequestMapping("/initimport")
public class InitImportController  {

	@Resource
	private final InitImportService service;

	@GetMapping("/test")
	@ApiOperation(value = "测试导入")
	public RestResult<Void> test(String dbPatch ) {
		service.importFormLocalCalibreDb(dbPatch);
		return RestResult.ok(null);
	}
}
